package org.hxd.client.products.service;

import org.hxd.client.products.dao.ProductsDao;
import org.hxd.pojo.Notice;
import org.hxd.pojo.Products;
import org.hxd.utils.PageModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductsServiceImpl implements ProductsService {
    @Resource
    ProductsDao productsDao;

    @Override
    public List<Products> findproductByCategory(String category, PageModel pageModel) {
        return productsDao.findproductByCategory(category,pageModel);
    }

    @Override
    public int findproductCountByCategory(String category) {
        return productsDao.findproductCountByCategory(category);
    }

    @Override
    public List<Products> findproductByname(String name,PageModel pageModel) {
        return productsDao.findproductByname(name,pageModel);
    }

    @Override
    public int findproductByNameCount(String name) {
        return productsDao.findproductByNameCount(name);
    }

    @Override
    public Products findProductById(String id) {
        return productsDao.findProductById(id);
    }

    @Override
    public Notice findNotice() {
        return productsDao.findNotice();
    }

    @Override
    public List<Products> findWeekHotProduct() {
        return productsDao.findWeekHotProduct();
    }
}
